]> dgit.raspbian.org Git - gnome-shell.git/commit
extensionUtils: Stop using RegExp for stack parsing
authorFlorian Müllner <fmuellner@gnome.org>
Sun, 9 Jul 2023 23:20:53 +0000 (01:20 +0200)
committerMarge Bot <marge-bot@gnome.org>
Sat, 15 Jul 2023 11:07:12 +0000 (11:07 +0000)
commit3289b79433b7e549a21035fc2ee5470344dde44d
tree40233900816ee4c412f955cc04648cce0c8ccafe
parentc2c4d84fc15f5164ba86e2bcc2dfe20816f5186d
extensionUtils: Stop using RegExp for stack parsing

We currently use a regular expression to extract the exact file path
from a stack line. That RE is no longer accurate:

 - we assume a line number at the end, but at one point the column
   number was added as well
 - stacks from ES modules use file:// URIs instead of plain paths

Luckily that doesn't matter: We don't want to access any actual
files, so all we need is a path that can be traversed and that
contains the UUID.

We can get that with simple string manipulation, so avoid the regex
overhead.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2832>
js/misc/extensionUtils.js